// 设计系统变量
// 导入全局样式变量
@import '../../../app.less';

// 已在app.less中定义，无需重复定义
// @border-color: #eaeaea;
// @font-size-base: 28rpx;
// @font-size-lg: 36rpx;

// 基础样式重置
// 图片缩略图容器
.thumbnail-container {
  display: flex;
  flex-wrap: wrap;
  gap: @spacing-sm;
  margin-top: @spacing-sm;
  padding: 0 @spacing-xs;
}

.thumbnail-item {
  width: 120rpx;
  height: 120rpx;
  position: relative;
  border-radius: @radius-base;
  overflow: hidden;
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-remove {
  position: absolute;
  top: 8rpx;
  right: 8rpx;
  width: 32rpx;
  height: 32rpx;
  background-color: rgba(0,0,0,0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24rpx;
}

// 主容器
.spot-container {
  display: flex;
  flex-direction: column;
  padding: @spacing-lg;
  background-color: @bg-primary;
  box-sizing: border-box;
  margin-bottom: 200rpx;
}
.spot-container.android {
  height: calc(100vh - @header-bar-height-android);
}
.spot-container.ios {
  height: calc(100vh - @header-bar-height-ios);

}
// 卡片容器增强
.card-enhanced {
  background-color: @card-bg;
  border-radius: @card-radius;
  box-shadow: @card-shadow;
  padding: @spacing-md;
  margin-bottom: @spacing-md;
  transition: all @transition-normal;
}

.card-enhanced:hover {
  box-shadow: @hover-shadow;
  transform: translateY(-2rpx);
}

// 基本信息区域
.spot-basic-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4rpx 8rpx;
  box-sizing: border-box;

  // 图片区域
  .spot-images {
    height: 350rpx;
    width: 100%;
    border: 2rpx dashed @border-color;
    border-radius: @card-radius;
    overflow: hidden;
    margin-bottom: @spacing-sm;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;

    image {
      width: 100%;
      height: 100%;
      object-fit: cover;

      // 上传按钮样式
      &:last-child {
        position: absolute;
        right: @spacing-sm;
        bottom: @spacing-sm;
        width: 96rpx;
        height: 96rpx;
        background-color: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
        transition: all @transition-normal;
      }

      &:last-child:active {
        transform: scale(0.95);
      }
    }
  }

  .image-placeholder {
    text-align: center;
    padding: @spacing-lg;
  }

  .placeholder-icon {
    width: 80rpx;
    height: 80rpx;
    margin: 0 auto @spacing-sm;
    opacity: 0.5;
  }

  .placeholder-text {
    color: @text-tertiary;
    font-size: @font-size-sm;
  }

  // 标题输入 - 突出样式
  .spot-title {
    font-size: @font-size-xl;
    font-weight: bold;
    padding: @spacing-sm @spacing-md;
    border-bottom: 2rpx solid @primary-color;
    margin: @spacing-sm 0 @spacing-md;
    background-color: @card-bg;
    border-radius: @radius-base @radius-base 0 0;

    input {
      width: 100%;
      font-size: inherit;
      font-weight: inherit;
      padding: @spacing-xs 0;
      background: transparent;
    }

    input:focus {
      border-bottom-color: @primary-dark;
      outline: none;
    }

    input::placeholder {
      color: @text-tertiary;
      font-weight: normal;
    }
  }

  // 位置选择
  .spot-location {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: @spacing-sm @spacing-md;
    width: 100%;
    background-color: @card-bg;
    border-radius: @radius-base;
    margin-bottom: @spacing-md;
    box-sizing: border-box;

    label {
      margin-right: @spacing-sm;
      margin-bottom: 0;
      color: @text-primary;
    }

    image {
      width: 56rpx;
      height: 56rpx;
      margin-left: auto;
      transition: transform @transition-normal;
    }

    image:active {
      transform: scale(0.95);
    }
  }
}

// 属性区域
.spot-properties {
  display: flex;
  flex-direction: column;
  gap: @spacing-xs;
  box-sizing: border-box;

  &>view {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: @spacing-md;
    background-color: white;
    box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;

    label {
      margin-bottom: @margin-base/2;
    }

    // 统一表单控件样式
    radio,
    checkbox {
      color: #666;
      /* 更柔和的文字颜色 */
      font-size: 28rpx;
      /* 略小的字号 */
      font-weight: normal;
      /* 常规字重 */
      margin-left: 20rpx;
    }

    // 单选/复选框组
    radio-group,
    checkbox-group {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: @margin-base/2;

      &>view {
        display: flex;
        align-items: center;
      }
    }
  }
}

// 响应式调整
@media (max-width: 480rpx) {
  .spot-images {
    height: 200rpx;
  }

  .spot-properties>view {
    padding: @spacing-sm;
    margin-bottom: @spacing-sm;

    radio-group,
    checkbox-group {
      flex-direction: row;
      flex-wrap: wrap;
    }
  }
}

.spot-desc {
  display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background-color: white;
    box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}


@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

// 响应式调整
@media (min-width: 600rpx) {
  .spot-container {
    max-width: 600rpx;
    margin: 0 auto;
  }
}